<template>
  <div>
    <p>TestA1组件:路由的参数id:{{ $route.params.id }}</p>
    <router-view></router-view>
  </div>
</template>
<script>
  export default {
    name: 'TestA1',
    data() {
      return {}
    },
    beforeRouteUpdate(to, from, next) {
      console.log('参数：', this.$route.params.id)
      console.log('参数不一样');
      // react to route changes...
      // don't forget to call next()
      next(true)//千万记住要写这个
    }
  };
</script>
